package cn.lg.soar.boot.config;

import cn.lg.soar.core.config.SwaggerConfigurerBase;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Configuration
@ConditionalOnProperty(name = "lg.swagger.enabled", havingValue = "true")
public class DemoSwaggerConfigurer extends SwaggerConfigurerBase {

    @Bean
    public GroupedOpenApi boot(){
        return GroupedOpenApi.builder()
                .group("demo-boot")
                .packagesToScan("cn.lg.soar.boot")
                .pathsToMatch("/**")
                .build();
    }

}
